<?php
/**
 * @file test012.php
 * @package taobaoke
 * @subpackage 
 * @version $id: 0.1 UTF-8 2009-7-20 下午07:42:28 $
 * @author LD King (mifunny.info)
 * @copyright Copyright (c) 2007 - 2009 MiFunny China Inc. (http://mifunny.info)
 * 测试直接入库
 * 
 */

require_once '../lib/functions.php';

getPostInfo();
/*$mc = array();
$str1 = "简洁花朵图案<span class=H>雪纺</span>丝带淑女裙/半身裙/<span class=H>雪纺</span>裙";
$str2 = "摩托V8（2G）刀锋战士内存超大超值赠送精美小礼品 保修一年";
$str3 = "特09夏 新款杂志款<span class=H>雪纺</span>衫";*/

//preg_match('/.*<span class=H>(.*)<\/span>.*/', $str3, $mc);
//$mc = preg_split('/.*<span class=H>|<\/span>.*/', $str3,  -1, PREG_SPLIT_NO_EMPTY);
//var_dump($mc);

/**
 * 测试实现功能：
 * 1.发布; √
 * 2.中文，关键字，分类; √ √ √ 
 * 3.html标签;
 * 4.文章缩略名; √ 
 * 5.预发布; √  修改时间
 * 6.自定义字段;
 * 7.不同作者; √ 
 * 
 */

$post = array(
  'comment_status' => 'open', // 'closed' means no comments.
  'ping_status' => 'closed', //Ping status?
  'post_author' => '3',
  'post_category' => array(3, 149),
  'post_content' => "[ <the text of the post> ] //The full text of the post.",
  'post_date' => date("Y-m-d H:i:s", mktime()+300 ),
  'post_excerpt' => "[ <an excerpt> ] //For all your post excerpt needs.",
  'post_name' => "wp slug",
  'post_status' => 'publish',
  'post_title' => "拉据战The title fafsdfaf post.",
  'post_type' => 'post',
  'tags_input' => '关键字1,  关键字2,  关键字3',
);
$metas = array();
echo "准备发布！！。。。<br />";
// 288
echo wp_insert_post($post);
echo "<br />发布-------OK<br />";


/*$tbk = new tbkDB();
$item = $tbk->getItemInfo('dfa9208ca2ccb5f60a014aebe7e0d3d9');
var_dump($item);*/




?>